Tangoe Procurement for Rivermine and Command [MobProc]
Request an Access Token
How to Request an Access Token using the Password grant type
NOTE: This tutorial assumes that you are using a client ID and client secret for an API client application that is configured to allow Resource Owner Password Credentials as one of its Allowed Grant Types__ configured in PingFederate.
For server-to-server scenarios, it is appropriate to use the password grant type when getting an access token for use with Tangoe APIs. When using the password grant type, the following information is required:
- client_id: Client ID assigned to your API client application.
- client_secret: Client secret assigned to your API client application.
- scope: OAuth scope(s) required for the API you are using.
- username: Username for the Tangoe service account to be associated with the access token being created.
- password: Password for this service account.
Endpoints
An access token is requested by making an HTTP POST to our Ping authentication endpoint. The specific endpoint used will depend upon your instance’s environment type:
- For Production:
https://oauth.tangoe.com/as/token.oauth2
- For QA:
https://oauthqa.tangoe.com/as/token.oauth2
NOTE: Although a unique client ID/client secret pair can be used to access multiple APIs, they are always assigned per environment. Therefore, an client ID/secret pair that is valid for one environment will not work for another environment.
Request Query Parameters
To get an access token, POST to the appropriate URL (above) for the type of environment your instance is using. The following query parameters need to be passed with this POST request:
Example
The following is an example of a POST request to get a token:
https://oauthqa.tangoe.com/as/token.oauth2?grant_type=password=376af94124f4400e9227c89937c12354=81f40d2777ea4a41A992535F17AC92EC=MOBPROC=command://myusername=mypassword
The following is an example of a response that might be returned:
{
"token_type": "Bearer",
"expires_in": 7199,
"refresh_token": "a9AhNvcffquYkV4bSw0O6gt4gKZRvTUGR2lfR8nJf4",
"access_token": "ts5grB07RB2GHAuOs67tJ4zJjV1R"
}
The following properties are returned in the access token response: